import { createRouter, createWebHashHistory } from 'vue-router'

const BlogLayout = () => import('../layout/BlogLayout')

const Home = () => import('../views/Home')

const routes = [
  {
    path: '/user',
    component: BlogLayout,
    children: []
  },
  {
    path: '/blog',
    component: BlogLayout,
    children: []
  },
  {
    path: '/',
    component: BlogLayout,
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'home',
        component: Home
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
